<template>
  <div>
    <div class="homeBg">
      <!-- 顶部搜索导航 -->
      <div class="topSearch">
        <!-- 跳转到个人中心 -->
        <!-- <router-link
          to="/userinfo"
          tag="div"
          class="left iconfont icon-qita"
        ></router-link> -->
        <div class="left iconfont icon-qita" @click="alloff(offs)"></div>
        <!-- 搜索框 -->
        <router-link tag="div" class="search" :to="'/searchToll'">
          <span class="iconfont icon-search"></span>告五人
        </router-link>
        <div class="right iconfont icon-shibie"></div>
      </div>
      <!-- 轮播图 -->
      <div class="bannerbox">
        <div class="swiper">
          <van-swipe
            class="my-swipe"
            @change="onChange"
            v-if="banners"
            :autoplay="3000"
          >
            <van-swipe-item v-for="item in banners" :key="item.bannerId">
              <img :src="item.pic" alt="" />
            </van-swipe-item>
            <template #indicator>
              <div class="custom-indicator">
                <ul>
                  <li
                    v-for="num in banners.length"
                    :key="num"
                    :class="{ con: current == num - 1 }"
                  ></li>
                </ul>
              </div>
            </template>
          </van-swipe>
        </div>
      </div>
      <!-- 分类功能 -->
      <div class="category">
        <ul>
          <router-link tag="li" to="dailySpecial">
            <div class="svg">
              <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-shipin"></use>
              </svg>
            </div>
            <p>每日推荐</p>
          </router-link>
          <li>
            <div class="svg">
              <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-banzou"></use>
              </svg>
            </div>
            <p>私人FM</p>
          </li>
          <router-link tag="li" to="SongSquare">
            <div class="svg">
              <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-diantai"></use>
              </svg>
            </div>
            <p>歌单</p>
          </router-link>
          <router-link tag="li" to="rankingList">
            <div class="svg">
              <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-paihang"></use>
              </svg>
            </div>
            <p>排行榜</p>
          </router-link>
          <li>
            <div class="svg">
              <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-geshou"></use>
              </svg>
            </div>
            <p>有声书</p>
          </li>
          <li>
            <div class="svg">
              <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-bisai"></use>
              </svg>
            </div>
            <p>数字专辑</p>
          </li>
          <li>
            <div class="svg">
              <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-fenlei2"></use>
              </svg>
            </div>
            <p>直播</p>
          </li>
          <li>
            <div class="svg">
              <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-quku"></use>
              </svg>
            </div>
            <p>关注新歌</p>
          </li>
          <li>
            <div class="svg">
              <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-yinse"></use>
              </svg>
            </div>
            <p>歌房</p>
          </li>
          <li>
            <div class="svg">
              <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-diantai"></use>
              </svg>
            </div>
            <p>游戏专区</p>
          </li>
        </ul>
      </div>
    </div>

    <div class="homeContent">
      <!-- 推荐歌单 -->
      <div class="songList">
        <div class="title">
          <h3>推荐歌单</h3>
          <router-link tag="div" class="more" to="SongSquare"
            >更多<span class="iconfont icon-arrow-right-bold"></span
          ></router-link>
        </div>
        <div class="lists" v-if="result">
          <ul>
            <router-link
              tag="li"
              :to="'/songList?id=' + item.id"
              v-for="item in result"
              :key="item.id"
            >
              <div class="img">
                <img :src="item.picUrl + '?param=140y140'" alt="" />
                <div class="players">
                  <div class="num">
                    <span class="iconfont icon-bofang"></span
                    >{{ item.playCount | playCountNum }}
                  </div>
                </div>
              </div>
              <p>
                {{ item.name }}
              </p>
            </router-link>
          </ul>
        </div>
      </div>

      <!-- 播放 -->
      <div class="selectedSong">
        <div class="title">
          <h3 v-if="BLOCK.uiElement">
            <span></span>
            {{ BLOCK.uiElement.subTitle.title }}
          </h3>
          <div class="more"><span class="iconfont icon-bofang"></span>播放</div>
        </div>

        <div class="lists" v-if="BLOCK.creatives">
          <div class="swiper-container swiper-container-selectedSong">
            <div class="swiper-wrapper">
              <div
                class="swiper-slide item"
                v-for="(item, index) in BLOCK.creatives"
                :key="index"
              >
                <!-- 上面三个swiper固定写法 -->
                <ul>
                  <li v-for="data in item.resources" :key="data.resourceId">
                    <div class="img">
                      <img
                        :src="data.uiElement.image.imageUrl + '?param=140y140'"
                      />
                    </div>
                    <div class="right">
                      <h4>
                        {{ data.resourceExtInfo.songData.name }}
                        <span>-{{ data.resourceExtInfo.artists[0].name }}</span>
                      </h4>
                      <i class="iconfont icon-bofang1"></i>
                    </div>
                  </li>
                </ul>
              </div>
            </div>
          </div>
        </div>
      </div>

      <!-- 推荐歌单2 -->
      <div class="songList-two">
        <div class="titles" v-if="PLAYLIST.uiElement">
          <h3>{{ PLAYLIST.uiElement.subTitle.title }}</h3>
          <!-- <h3>小米欧德的雷达歌曲</h3> -->
          <div class="more">
            {{ PLAYLIST.uiElement.button.text }}
            <span class="iconfont icon-arrow-right-bold"></span>
          </div>
        </div>
        <div class="lists">
          <ul>
            <router-link
              tag="li"
              :to="'/songList?id=' + item.creativeId"
              v-for="item in PLAYLIST.creatives"
              :key="item.creativeId"
            >
              <div class="img">
                <img
                  :src="
                    item.resources[0].uiElement.image.imageUrl +
                    '?param=140y140'
                  "
                />
                <div class="players">
                  <div class="num">
                    <span class="iconfont icon-bofang"></span
                    >{{
                      item.resources[0].resourceExtInfo.playCount | playCountNum
                    }}
                  </div>
                </div>
              </div>
              <p>
                {{ item.uiElement.mainTitle.title }}
              </p>
            </router-link>
          </ul>
        </div>
      </div>
      <!-- 排行版 -->
      <div class="leaderboards">
        <div class="title">
          <h3>排行榜</h3>
          <div class="more">
            更多<span class="iconfont icon-arrow-right-bold"></span>
          </div>
        </div>
        <!-- 热歌榜 -->
        <div class="hotsong">
          <div class="swiper-container swiper-container-selectedSong">
            <div class="swiper-wrapper">
              <div class="swiper-slide items">
                <ul>
                  <li>
                    <div class="reb">
                      <h3>云音乐民谣榜<span>></span></h3>
                      <p>1.3亿人在听</p>
                    </div>
                    <div class="see">
                      <div class="img">
                        <img
                          src="	http://p1.music.126.net/0KCMOKHHbimwfdVvPPBpTA==/109951164034526943.jpg?param=140y140"
                          alt=""
                        />
                      </div>
                      <span>1</span>
                      <div class="item">
                        <h4>孤单心事</h4>
                        <p>颜人中</p>
                      </div>
                      <span class="iconfont icon-bofang1"></span>
                    </div>
                    <div class="see">
                      <div class="img">
                        <img
                          src="http://p1.music.126.net/A4uSU0kJZT0xpw-S0fGg2Q==/109951164539421824.jpg?param=140y140"
                          alt=""
                        />
                      </div>
                      <span>2</span>
                      <div class="item">
                        <h4>我要找到你</h4>
                        <p>Zic子晨</p>
                      </div>
                      <span class="iconfont icon-bofang1"></span>
                    </div>
                    <div class="see">
                      <div class="img">
                        <img
                          src="http://p1.music.126.net/BiLZ2f_E-UcwAjU_Ky14rg==/109951166054618753.jpg?param=140y140"
                          alt=""
                        />
                      </div>
                      <span>3</span>
                      <div class="item">
                        <h4>Valder Fields</h4>
                        <p>Tamas Wells</p>
                      </div>
                      <span class="iconfont icon-bofang1"></span>
                    </div>
                  </li>
                </ul>
              </div>
              <div class="swiper-slide items">
                <ul>
                  <li>
                    <div class="reb">
                      <h3>热歌榜<span>></span></h3>
                      <p>云村用户都在听</p>
                    </div>
                    <div class="see">
                      <div class="img">
                        <img
                          src="http://p1.music.126.net/gjfvKEOyC5dvP7Zud4Dl-g==/109951166006243305.jpg?param=140y140"
                          alt=""
                        />
                      </div>
                      <span>1</span>
                      <div class="item">
                        <h4>His Theme (From "Undertale")</h4>
                        <p>Mokita</p>
                      </div>
                      <span class="iconfont icon-bofang1"></span>
                    </div>
                    <div class="see">
                      <div class="img">
                        <img
                          src="http://p1.music.126.net/RhUPEqRxL73R71i5un70uQ==/109951163676377030.jpg?param=140y140"
                          alt=""
                        />
                      </div>
                      <span>2</span>
                      <div class="item">
                        <h4>就这样和你在一起</h4>
                        <p>蝴蝶效应(B.E.)</p>
                      </div>
                      <span class="iconfont icon-bofang1"></span>
                    </div>
                    <div class="see">
                      <div class="img">
                        <img
                          src="	http://p1.music.126.net/YEiEXpXuoTm2Yy5G4cR2Tw==/109951165825324223.jpg?param=140y140"
                          alt=""
                        />
                      </div>
                      <span>3</span>
                      <div class="item">
                        <h4>适可而止也到此为止</h4>
                        <p>梓冷</p>
                      </div>
                      <span class="iconfont icon-bofang1"></span>
                    </div>
                  </li>
                </ul>
              </div>
              <div class="swiper-slide items">
                <ul>
                  <li>
                    <div class="reb">
                      <h3>网络热歌榜<span>></span></h3>
                      <p>全网用户都在听</p>
                    </div>
                    <div class="see">
                      <div class="img">
                        <img
                          src="http://p1.music.126.net/6DtmsO-P4jyJPLjnGa8Ytg==/109951165004114065.jpg?param=140y140"
                          alt=""
                        />
                      </div>
                      <span>1</span>
                      <div class="item">
                        <h4>回到夏天</h4>
                        <p>傲七爷</p>
                      </div>
                      <span class="iconfont icon-bofang1"></span>
                    </div>
                    <div class="see">
                      <div class="img">
                        <img
                          src="http://p1.music.126.net/4fGSYK5S1SskrZjkyCJfJw==/109951166035185227.jpg?param=140y140"
                          alt=""
                        />
                      </div>
                      <span>2</span>
                      <div class="item">
                        <h4>银河与星斗</h4>
                        <p>yihuik苡慧</p>
                      </div>
                      <span class="iconfont icon-bofang1"></span>
                    </div>
                    <div class="see">
                      <div class="img">
                        <img
                          src="http://p1.music.126.net/x-jReyGkM5OTKUEtTqXGoA==/109951164597332931.jpg?param=140y140"
                          alt=""
                        />
                      </div>
                      <span>3</span>
                      <div class="item">
                        <h4>与我无关</h4>
                        <p>阿冗</p>
                      </div>
                      <span class="iconfont icon-bofang1"></span>
                    </div>
                  </li>
                </ul>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
    <!-- 个人中心 -->
    <div class="consumer" v-show="offs">
      <div class="mycenter">
        <div class="mycenter-top" @click="evalue(offs)" v-if="message.profile">
          <router-link
            tag="div"
            class="center-top-left"
            :to="'/personalCenter?id=' + particulars"
          >
            <div class="img">
              <img :src="message.profile.avatarUrl + '?param=140y140'" />
            </div>
            <div class="names">
              {{ message.profile.nickname }}
              <span class="iconfont icon-arrow-right-bold"></span>
            </div>
          </router-link>
          <div class="center-top-rigth iconfont icon-diantai1"></div>
        </div>
        <div v-if="state == null">
          <router-link class="register" tag="div" to="/Login">
            点击登录<span class="iconfont icon-arrow-right-bold"></span>
          </router-link>
        </div>

        <div class="open">
          <div class="open-top">
            <div class="open-left">
              <div class="vinyl">开通黑胶VIP</div>
              <div class="Stand">立享超21项专享特权></div>
            </div>
            <div class="open-rigth">会员中心</div>
          </div>
          <div class="open-bottom">
            <div class="bottom-left">受邀专享，黑胶首月仅2.8元！</div>
          </div>
        </div>
        <div class="mycttwo">
          <ul>
            <li>
              <div class="info">
                <span class="sp-i iconfont icon-wenjian"></span> 我的消息
              </div>
              <div class="i">
                99+ <span class="sp-l iconfont icon-arrow-right-bold"></span>
              </div>
            </li>
            <li>
              <div class="info">
                <span class="sp-i iconfont icon-caidan"></span> 云贝中心
              </div>
              <div class="i">
                <span class="sp-l iconfont icon-arrow-right-bold"></span>
              </div>
            </li>
            <li>
              <div class="info">
                <span class="sp-i iconfont icon-paihang1"></span> 创作者中心
              </div>
              <div class="i">
                <span class="sp-l iconfont icon-arrow-right-bold"></span>
              </div>
            </li>
          </ul>
        </div>
        <div class="mycthree">
          <ul>
            <div class="serve">音乐服务</div>
            <li>
              <div class="info">
                <span class="sp-i iconfont icon-wenjian"></span> 云村有票
              </div>
              <div class="i">
                <span class="sp-l iconfont icon-arrow-right-bold"></span>
              </div>
            </li>
            <li>
              <div class="info">
                <span class="sp-i iconfont icon-caidan"></span> 商场
              </div>
              <div class="i">
                降噪耳机仅49元
                <span class="sp-l iconfont icon-arrow-right-bold"></span>
              </div>
            </li>
            <li>
              <div class="info">
                <span class="sp-i iconfont icon-paihang1"></span> Beat交易平台
              </div>
              <div class="i">
                <span class="sp-l iconfont icon-arrow-right-bold"></span>
              </div>
            </li>
            <li>
              <div class="info">
                <span class="sp-i iconfont icon-shequ"></span> 游戏专区
              </div>
              <div class="i">
                <span class="sp-l iconfont icon-arrow-right-bold"></span>
              </div>
            </li>
            <li>
              <div class="info">
                <span class="sp-i iconfont icon-paihang1"></span> 口袋彩铃
              </div>
              <div class="i">
                今天来点音乐陪酒
                <span class="sp-l iconfont icon-arrow-right-bold"></span>
              </div>
            </li>
          </ul>
        </div>
        <div class="mycfour">
          <ul>
            <div class="serve">其他</div>
            <li>
              <div class="info">
                <span class="sp-i iconfont icon-wenjian"></span> 设置
              </div>
              <div class="i">
                <span class="sp-l iconfont icon-arrow-right-bold"></span>
              </div>
            </li>
            <li>
              <div class="info">
                <span class="sp-i iconfont icon-caidan"></span> 深色模式
              </div>
              <div class="i">
                <span class="sp-l iconfont icon-arrow-right-bold"></span>
              </div>
            </li>
            <li>
              <div class="info">
                <span class="sp-i iconfont icon-paihang1"></span> 定时关闭
              </div>
              <div class="i">
                <span class="sp-l iconfont icon-arrow-right-bold"></span>
              </div>
            </li>
            <li>
              <div class="info">
                <span class="sp-i iconfont icon-shequ"></span> 个性打扮
              </div>
              <div class="i">
                <span class="sp-l iconfont icon-arrow-right-bold"></span>
              </div>
            </li>
            <li>
              <div class="info">
                <span class="sp-i iconfont icon-paihang1"></span> 边听边存
              </div>
              <div class="i">
                未开启<span class="sp-l iconfont icon-arrow-right-bold"></span>
              </div>
            </li>
            <li>
              <div class="info">
                <span class="sp-i iconfont icon-paihang1"></span> 在线听歌免流量
              </div>
              <div class="i">
                <span class="sp-l iconfont icon-arrow-right-bold"></span>
              </div>
            </li>
            <li>
              <div class="info">
                <span class="sp-i iconfont icon-paihang1"></span> 音乐黑名单
              </div>
              <div class="i">
                <span class="sp-l iconfont icon-arrow-right-bold"></span>
              </div>
            </li>
            <li>
              <div class="info">
                <span class="sp-i iconfont icon-paihang1"></span> 青年模式
              </div>
              <div class="i">
                未开启<span class="sp-l iconfont icon-arrow-right-bold"></span>
              </div>
            </li>
          </ul>
        </div>
        <div class="base">
          <div class="quit">退出登录/关闭</div>
        </div>
      </div>
      <div class="ji" @click="allno(offs)"></div>
    </div>
  </div>
</template>

<script>
import "../assets/font/iconfont.js";
//引入接口
import {
  getBanner,
  getHomepage,
  getpersonalized,
  getHomeround,
  getparticulars,
  getstate,
} from "../api/home";
import Swiper from "swiper";

export default {
  data() {
    return {
      current: 0, //下标
      banners: [], //轮播图
      creatives: [], //推荐歌单
      result: [], //推荐歌单2
      state: null, //登录状态
      BLOCK: {
        uiElement: "",
        creatives: [],
      },
      offs: false,
      PLAYLIST: {
        uiElement: "",
        creatives: [],
      },
      round: [],
      particulars: [],
      message: "",
    };
  },
  methods: {
    //显示个人中心
    alloff() {
      this.offs = true;
      this.$emit("notably", this.offs);
      // console.log(this.offs, "开");
    },
    //隐藏个人中心
    allno() {
      this.offs = false;
      // console.log(this.offs, "关");
      this.$emit("notably", this.offs);
    },
    //进入我的主页
    evalue() {
      this.offs = false;
      // console.log(this.offs, "关");
      this.$emit("notably", this.offs);
    },
    onChange(index) {
      this.current = index;
    },
    getBannerFun() {
      //轮播图数据
      getBanner().then((data) => {
        // console.log(data,"轮播图数据");
        this.banners = data.banners;
      });
    },
    //推荐歌单
    getpersonalizedFun() {
      getpersonalized().then((data) => {
        // console.log(data,"推荐歌单");
        this.result = data.result;
        // console.log(this.result,"推荐歌单")
      });
    },
    getHomepageFun() {
      //首页
      getHomepage().then((data) => {
        // console.log(data, "首页数据");
        // this.banners = data.data.blocks[0].extInfo.banners;
        // this.creatives = data.data.blocks[1].creatives;
        this.BLOCK = data.data.blocks[2];
        this.PLAYLIST = data.data.blocks[3];
        // console.log(this.PLAYLIST, "PLAYLIST");
        // console.log(this.creatives,"推荐歌单");
        console.log(this.BLOCK, "BLOCK");
      });
    },
    //首页，圆形图标
    getHomeroundFun() {
      getHomeround().then((data) => {
        // console.log(data, "圆形图标数据");
        this.round = data.data;
      });
    },
    //获取账户信息
    getparticularsFun() {
      getparticulars().then((data) => {
        // console.log(data, "用户账户信息");
        // this.particulars = data.profile.userId;
        this.particulars = data.account.id;
        this.message = data;
        // console.log(this.particulars, "用户id");
      });
    },
    //判断登录状态
    getstateFun() {
      getstate().then((data) => {
        console.log(data, "登录状态");
        this.state = data.data.profile;
      });
    },
  },
  created() {
    this.getBannerFun(); //轮播图数据
    this.getHomepageFun(); //首页数据
    this.getpersonalizedFun(); //推荐歌单
    this.getHomeroundFun(); //圆形数据
    this.getparticularsFun(); //账户信息
    this.getstateFun(); //登录状态
  },
  mounted() {
    new Swiper(".swiper-container-selectedSong", {
      slidesPerView: "auto",
      paginationClickable: true,
      spaceBetween: 12, //距离px
      observer: true, //修改swiper自己或子元素时，自动初始化swiper
      observeParents: true, //修改swiper的父元素时，自动初始化swipe
    });
  },
  //过滤器
  filters: {
    playCountNum(v) {
      let w = v > 10000 ? v / 10000 : v; //万计算
      let y = w > 10000 ? parseInt(w / 10000) + "亿" : parseInt(w) + "万"; //亿计算
      return y;
    },
  },
};
</script>

<style lang="less">
//一人一首华语今典
.selectedSong {
  margin-top: 8px;
  background-color: #fff;
  padding: 12px 0px 12px 12px;
  border-radius: 7px;
  .title {
    display: flex;
    justify-content: space-between;
    h3 {
      height: 31px;
      line-height: 31px;
      padding-left: 20px;
      background: url("../assets/img/01.png") no-repeat left center;
      background-size: 18px;
    }
    .more {
      height: 20px;
      line-height: 21px;
      width: 42px;
      border: 1px solid #f7f7f7;
      border-radius: 10px;
      font-size: 10px;
      text-align: center;
      margin-right: 12px;
      margin-top: 5px;
      .iconfont {
        font-size: 10px;
      }
    }
  }
  .lists {
    .item {
      width: 93%;
      &:last-of-type {
        width: 96%;
        margin-right: 4%;
      }
      ul {
        li {
          display: flex;
          .img {
            width: 40px;
            height: 40px;
            margin: 2px 7px 2px 0px;
            border-radius: 6px;
            overflow: hidden;
            img {
              width: 40px;
              height: 40px;
            }
          }
          .right {
            flex: 1;
            display: flex;
            justify-content: space-between;
            h4 {
              height: 45px;
              line-height: 45px;
              color: #323232;
              span {
                font-size: 12px;
                color: #949494;
              }
            }
            border-bottom: 2px solid #f7f7f7;
            .iconfont {
              font-size: 25px;
              line-height: 45px;
            }
          }
          &:last-of-type {
            .right {
              border: none;
            }
          }
        }
      }
    }
  }
}
.homeContent {
  background: #f5f5f5;
  height: 900px;
}
//推荐歌单
.songList {
  background: #fff;
  padding-left: 12px;
  padding-bottom: 12px;
  border-radius: 0px 0px 7px 7px;

  .title {
    display: flex;
    justify-content: space-between;
    h3 {
      height: 44px;
      line-height: 44px;
    }
    .more {
      height: 20px;
      line-height: 21px;
      width: 42px;
      border: 1px solid #f7f7f7;
      border-radius: 10px;
      font-size: 10px;
      text-align: center;
      margin-top: 13px;
      margin-right: 12px;
      .iconfont {
        font-size: 10px;
      }
    }
  }
  .lists {
    overflow-y: scroll;
    padding-top: 2px;
    ul {
      display: flex;
      li {
        width: 110px;
        margin-right: 7px;
        .img {
          box-shadow: 0px -2px 1px #f2f2f2;
          width: 110px;
          height: 110px;
          border-radius: 8px;
          overflow: hidden;
          position: relative;
          .players {
            position: absolute;
            top: 2px;
            right: 2px;
            height: 14px;
            line-height: 14px;
            color: #fff;
            background-color: #c5c5c5;
            border-radius: 7px;
            font-size: 10px;
            .num {
              transform: scale(0.8);
              .iconfont {
                font-size: 8px;
              }
            }
          }
          img {
            width: 110px;
            height: 110px;
          }
        }
        p {
          font-size: 12px;
          color: #353535;
          height: 32px;
          overflow: hidden;
        }
      }
    }
  }
}
//推荐歌单2
.songList-two {
  background: #fff;
  padding-left: 12px;
  padding-bottom: 12px;
  border-radius: 7px 7px 7px 7px;
  margin-top: 10px;
  .titles {
    display: flex;
    justify-content: space-between;
    h3 {
      height: 44px;
      line-height: 44px;
    }
    .more {
      height: 20px;
      line-height: 21px;
      width: 42px;
      border: 1px solid #f7f7f7;
      border-radius: 10px;
      font-size: 10px;
      text-align: center;
      margin-top: 13px;
      margin-right: 12px;
      .iconfont {
        font-size: 10px;
      }
    }
  }
  .lists {
    overflow-y: scroll;
    padding-top: 2px;
    ul {
      display: flex;
      li {
        width: 110px;
        margin-right: 7px;
        .img {
          box-shadow: 0px -2px 1px #f2f2f2;
          width: 110px;
          height: 110px;
          border-radius: 8px;
          overflow: hidden;
          position: relative;
          .players {
            position: absolute;
            top: 2px;
            right: 2px;
            height: 14px;
            line-height: 14px;
            color: #fff;
            background-color: #c5c5c5;
            border-radius: 7px;
            font-size: 10px;
            .num {
              transform: scale(0.8);
              .iconfont {
                font-size: 8px;
              }
            }
          }
          img {
            width: 110px;
            height: 110px;
          }
        }
        p {
          font-size: 12px;
          color: #353535;
          height: 32px;
          overflow: hidden;
        }
      }
    }
  }
}
//排行榜
.leaderboards {
  background: #fff;
  padding-left: 12px;
  padding-bottom: 12px;
  border-radius: 7px 7px 7px 7px;
  margin-top: 8px;
  .title {
    display: flex;
    justify-content: space-between;
    h3 {
      height: 44px;
      line-height: 44px;
    }
    .more {
      height: 20px;
      line-height: 21px;
      width: 42px;
      border: 1px solid #f7f7f7;
      border-radius: 10px;
      font-size: 10px;
      text-align: center;
      margin-top: 13px;
      margin-right: 12px;
      .iconfont {
        font-size: 10px;
      }
    }
  }
  //热歌榜
  .hotsong {
    // overflow-y: scroll;
    // width: 90%;
    .items {
      width: 90%;
      &:last-of-type {
        width: 96%;
        margin-right: 4%;
      }
      ul {
        display: flex;
        width: 100%;
        height: 200px;
        border: 1px solid #f8f8f8;
        border-radius: 8px;
        flex-direction: column;
        li {
          display: flex;
          flex-direction: column;
          .reb {
            display: flex;
            justify-content: space-between;
            h3 {
              height: 44px;
              line-height: 44px;
              margin-left: 10px;
              .icoo {
                font-size: 8px;
              }
            }
            p {
              height: 44px;
              line-height: 44px;
              font-size: 14px;
              color: #999999;
              margin-right: 8px;
            }
          }
          .see {
            display: flex;
            margin-top: 4px;
            .img {
              width: 40px;
              height: 40px;
              margin: 2px 7px 2px 10px;
              border-radius: 6px;
              overflow: hidden;
              img {
                width: 40px;
                height: 40px;
              }
            }
            span {
              height: 40px;
              line-height: 45px;
              width: 25px;
              text-align: center;
              font-weight: 400;
            }
            .item {
              display: flex;
              flex-direction: column;
              margin-left: 5px;
              h4 {
                height: 21px;
                overflow: hidden;
                font-size: 16px;
                margin-top: 5px;
              }
              p {
                font-size: 12px;
                color: #999999;
              }
            }
            .iconfont {
              flex: 1;
              text-align: right;
              margin-right: 10px;
              font-size: 25px;
            }
          }
        }
      }
    }
  }
}

.homeBg {
  background-image: linear-gradient(#e8ecec 40%, #ffffff 60%);
}
//分类功能
.category {
  margin: 12px 0px 0px 0px;
  padding-bottom: 12px;
  padding-left: 12px;
  overflow-x: scroll;
  border-bottom: 2px solid #f5f5f5;
  ul {
    display: flex;
    li {
      display: flex;
      flex-direction: column;
      width: 37px;
      margin-right: 32px;
      .svg {
        height: 37px;
        width: 37px;
        text-align: center;
        background-color: #fff1f1;
        border-radius: 50%;
        line-height: 37px;
        img {
          height: 37px;
          width: 37px;
          border-radius: 50%;
          background-color: red;
        }
      }
      p {
        width: 48px;
        font-size: 10px;
        color: #818181;
        text-align: center;
        transform: scale(0.7) translateX(-6px);
      }
    }
  }
}
//顶部搜索导航
.topSearch {
  display: flex;
  height: 46px;
  .left,
  .right {
    flex: 0 0 40px;
    text-align: center;
    line-height: 46px;
    color: #131414;
    font-size: 19px;
    font-weight: bold;
  }
  .right {
    font-weight: normal;
    font-size: 26px;
  }
  .search {
    flex: 1;
    text-align: center;
    height: 26px;
    line-height: 26px;
    margin-top: 10px;
    border-radius: 13px;
    background: #fff;
    color: #8a8a8a;
    font-size: 13px;
  }
}
//轮播图
.bannerbox {
  width: 100%;
  text-align: center;
  .swiper {
    margin: 0 auto;
    width: 93.6%;
    // height: 137px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    img {
      width: 100%;
    }
    .custom-indicator {
      width: 100%;
      position: absolute;
      left: 0px;
      bottom: 0px;
      text-align: center;
      ul {
        display: inline-block;
        margin: 0 auto;
        li {
          display: inline-block;
          width: 6px;
          height: 2px;
          margin: 0px 2px;
          background: rgba(255, 255, 255, 0.6);
          &.con {
            background-color: #fff;
          }
        }
      }
    }
    .my-swipe {
      display: flex;
    }
  }
}

.icon {
  width: 1em;
  height: 1em;
  vertical-align: -0.15em;
  fill: currentColor;
  overflow: hidden;
}
//个人中心
.consumer {
  width: 100%;
  height: 100%;
  background-color: rgb(64 61 61 / 60%);
  z-index: 1000;
  position: fixed;
  top: 0px;
  left: 0px;
  display: flex;
  .mycenter {
    width: 84%;
    height: 100%;
    background-color: #f5f5f5;
    overflow-y: scroll;
    z-index: 1001;
    .mycenter-top {
      height: 24px;
      display: flex;
      margin-left: 12px;
      margin-top: 10px;
      justify-content: space-between;
      .center-top-left {
        display: flex;
        .img {
          width: 22px;
          height: 22px;
          margin-right: 8px;
          img {
            width: 22px;
            height: 22px;
            border-radius: 50%;
          }
        }
        .names {
          font-size: 16px;
          line-height: 21px;
        }
      }
      .center-top-rigth {
        line-height: 24px;
        font-size: 22px;
        margin-right: 12px;
      }
    }
    .register {
      height: 24px;
      margin-left: 12px;
      margin-top: 10px;
      font-size: 16px;
    }
    .open {
      width: 94%;
      background-color: #333333;
      margin: 0 auto;
      border-radius: 10px;
      display: flex;
      flex-direction: column;
      margin-top: 20px;
      .open-top {
        display: flex;
        margin-left: 12px;
        margin-top: 12px;
        justify-content: space-between;
        border-bottom: 1px solid #3f3f3f;
        .open-left {
          display: flex;
          flex-direction: column;
          .vinyl {
            color: #ffe8e3;
            font-size: 13px;
          }
          .Stand {
            font-size: 12px;
            color: #7f726f;
            margin-top: 4px;
            margin-bottom: 10px;
          }
        }
        .open-rigth {
          margin-right: 12px;
          height: 19px;
          line-height: 19px;
          border-radius: 10px;
          border: 1px solid #a99592;
          color: #a99592;
          font-size: 12px;
          padding: 0px 5px;
        }
      }
      .open-bottom {
        .bottom-left {
          font-size: 12px;
          color: #7f726f;
          margin: 10px 0px 10px 12px;
        }
      }
    }
    .mycttwo {
      width: 94%;
      background-color: #fff;
      margin: 0 auto;
      border-radius: 10px;
      ul {
        margin-top: 18px;
        li {
          height: 38px;
          line-height: 38px;
          display: flex;
          justify-content: space-between;
          border-bottom: 2px solid #f6f6f6;
          margin-left: 14px;
          .info {
            font-size: 16px;
            .sp-i {
              font-size: 20px;
            }
          }
          .i {
            margin-right: 12px;
            font-size: 14px;
            color: red;
            span {
              color: #d4d4d4;
            }
          }
        }
      }
    }
    .mycthree {
      width: 94%;
      background-color: #fff;
      margin: 0 auto;
      border-radius: 10px;
      ul {
        margin-top: 18px;
        .serve {
          height: 30px;
          line-height: 30px;
          margin-left: 16px;
          border-bottom: 2px solid #f6f6f6;
          font-size: 12px;
          color: #828282;
        }
        li {
          height: 38px;
          line-height: 38px;
          display: flex;
          justify-content: space-between;
          border-bottom: 2px solid #f6f6f6;
          margin-left: 14px;
          .info {
            font-size: 16px;
            .sp-i {
              font-size: 20px;
            }
          }
          .i {
            margin-right: 12px;
            font-size: 12px;
            color: #989898;
            span {
              color: #d4d4d4;
            }
          }
        }
      }
    }
    .mycfour {
      width: 94%;
      background-color: #fff;
      margin: 0 auto;
      border-radius: 10px;
      ul {
        margin-top: 18px;
        .serve {
          height: 30px;
          line-height: 30px;
          margin-left: 16px;
          border-bottom: 2px solid #f6f6f6;
          font-size: 12px;
          color: #828282;
        }
        li {
          height: 38px;
          line-height: 38px;
          display: flex;
          justify-content: space-between;
          border-bottom: 2px solid #f6f6f6;
          margin-left: 14px;
          .info {
            font-size: 16px;
            .sp-i {
              font-size: 20px;
            }
          }
          .i {
            margin-right: 12px;
            font-size: 12px;
            color: #989898;
            span {
              color: #d4d4d4;
            }
          }
        }
      }
    }
    .base {
      width: 94%;
      background-color: #fff;
      margin: 0 auto;
      border-radius: 10px;
      margin-top: 18px;
      margin-bottom: 22px;
      .quit {
        height: 40px;
        line-height: 40px;
        text-align: center;
        font-size: 16px;
        color: red;
      }
    }
  }
  .ji {
    width: 16%;
  }
}
</style>